﻿@model Jb.Web.ViewModels.UtilityModels.ListConfig
@using Jb.Web.Utility;
@{    
    if (UserInfo.IsCompanyUser) {
        Layout = "~/Views/Shared/_LayoutPrivate.cshtml";
        ViewData[AppConstants.ViewDataKeys.SELECTED_MENU] = EmployerMenu.None;
    }
	String pageTitle = "Subscribe to a Package";
    ViewBag.Title = Html.GetPageTitle(pageTitle);    
	String editUrlFormat = Url.AdminUrl("Edit", "Package") + "/{0}";
	///Bind Package ListConfig
	///Following ListConfig binding needs to be edited according to the query result and need.
	Jb.Web.ViewModels.UtilityModels.ListConfig _ListConfig = Jb.Web.ViewModels.UtilityModels.ListConfig.Build(
        @"Basic Info {Name|Price|Last Modified}
		, Package Info {Can Post Jobs|Can Download Resume|Duration}
        , Subscribe{ID: <a href='/Package/Subscribe/{0}' class='btn' package-id='{0}' >Subscribe</a>(ID) }" //, History {Created|Modified}"		
        , Model.DataSource, false, editUrlFormat);
    //, Status {IsActive|Active Subscribers|InActive Subscribers}
    _ListConfig.ShowFieldName = true;
    _ListConfig.MakeFieldNameBold = false;
    if(UserInfo.IsCompanyUser){
        ViewData[AppConstants.ViewDataKeys.SELECTED_MENU] = EmployerMenu.Subscriptions; 
    }
}

<div class="jb-page-heading">
    <h1>@pageTitle</h1>
    <div>
        Subscribe to a pakcage to be able to Post Jobs and Download Resumes.
    </div>
</div>

<div class="jb-page-content">    
    @if (!UserInfo.IsCompanyUser){
        @Html.WarningMessageBox("You need to login as Employer to subscribe to a package.")
    }
    
    @Html.Partial("_ListView", _ListConfig)
    @if (Model.Pager != null)
    {    
        @Html.Partial("_Pager", Model.Pager)
    }
</div>

@*@section RightSideBar{
<div style="height:330px;"></div>
}*@